gdk_window_set_support_multidevice (priv->window, TRUE);
_gtk_widget_enable_device_events (widget);
-
- context = g_object_get_qdata (G_OBJECT (widget),
- quark_style_context);
- if (context)
- {
- GtkWidgetPath *path;
-
- path = gtk_widget_get_path (widget);
- gtk_style_context_set_path (context, path);
- gtk_widget_path_free (path);
- }
}
}
{
GtkWidgetPrivate *priv;
GtkStateData data;
+ GtkStyleContext *context;
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (GTK_IS_WIDGET (parent));
{
gtk_widget_queue_compute_expand (parent);
}
+
+ context = g_object_get_qdata (G_OBJECT (widget),
+ quark_style_context);
+ if (context)
+ {
+ GtkWidgetPath *path;
+
+ path = gtk_widget_get_path (widget);
+ gtk_style_context_set_path (context, path);
+ gtk_widget_path_free (path);
+ }
}
/**
GList *regions, *reg;
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
- g_return_val_if_fail (gtk_widget_get_realized (widget), NULL);
+ g_return_val_if_fail ((widget->parent || gtk_widget_is_toplevel (widget)), NULL);
parent = widget->priv->parent;
GTK_STYLE_PROVIDER_PRIORITY_USER);
}
- if (gtk_widget_get_realized (widget))
+ if (widget->parent ||
+ gtk_widget_is_toplevel (widget))
{
GtkWidgetPath *path;